package com.balabala.goods.api;

import com.balabala.goods.config.FeignConfig;
import com.balabala.goods.pojo.dto.CartItemDTO;
import com.balabala.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;

/**
 * @Author 何涛
 * @Date: 2023/05/08/ 10:51
 * @description
 */
@FeignClient(value = "gym-goods-service",contextId = "cartFeign",configuration = FeignConfig.class)
public interface CartFeignClient {

    /**
     * 远程调用获取用户购物车
     * @return
     */
    @GetMapping("/app/cart/getUserCart")
     Result<List<CartItemDTO>> getUserCart();

    /**
     * 清空用户已选的购物项
     * @param skuIds
     * @return
     */
    @PutMapping("/app/cart/deleteCartCheckSkus")
    Result deleteCartCheckSkus(List<Long> skuIds);
}
